<%-- 
    Document   : GoodsCenter
    Created on : 2015-4-23, 0:06:02
    Author     : cjh(358319110@qq.com)
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" type="text/css" href="front/css/home-page.css"/>
        <link rel="stylesheet" type="text/css" href="front/css/articleCenter.css"/>
        <link rel="stylesheet" type="text/css" href="front/css/jquery.mCustomScrollbar.css"/>
        <script src="front/js/jquery-1.11.2.js"></script>
        <!--<script src="front/js/jquery.easing.1.3.js"></script>-->
        <script src="front/js/Velocity.js"></script>
        <script src="front/js/jquery.mCustomScrollbar.concat.min.js"></script>
        <script src="front/js/home-page.js"></script>
        <!--<script src="front/js/ModifyPassWords.js"></script>-->
        <script src="front/js/articleCenter.js"></script>
        <title>物品中心</title>
    </head>
    <body class="all-page articleCenter">
        <jsp:include page="head.jsp"></jsp:include>

            <div class="articleDisplay">
                <div class="title">物品中心
                    <form action="GoodsCenter" method="get">
                        <input id="search" name="search" type="text" placeholder="查找（支持空格多关键字查找）"/>
                        <!--<input type="submit" value="搜索"/>-->
                    </form>
                </div>
                <div class="content">
                    <table>
                        <thead>
                            <tr><th>物品名称</th><th>借阅归还</th><th>借出时间</th><th>应还时间</th><th>借取人</th><th>联系方式</th></tr>
                        </thead>

                        <tbody>
                        <c:forEach items="${listUserGoodsDTO}" var="userGoodsDTO">
                            <tr>
                                <td>${userGoodsDTO.goodsName}</td>
                                <td>
                                    <c:if test="${userGoodsDTO.isReturn!=0}">
                                        <button>点我借阅</button>
                                        <input id="DTOGid" type="hidden" value="${userGoodsDTO.gid}" name="gid"/>
                                        
                                        <!--<input type="button" onclick="window.location = 'borrow?goodsId=${userGoodsDTO.gid}'" value="点我借阅">-->
                                    </c:if>
                                    <c:if test="${userGoodsDTO.isReturn==0}">
                                        <button>借出</button>
                                        <!--<input type="button" onclick="window.location = 'returnGoods?bid=${userGoodsDTO.bid}'" value="还东西">-->
                                    </c:if>
                                </td>
                                <td>${userGoodsDTO.lendDate}</td>
                                <td>${userGoodsDTO.returnDate}</td>
                                <td>${userGoodsDTO.userName}</td>
                                <td>${userGoodsDTO.userPhone}</td>
                                <td class="tdHidden">${userGoodsDTO.userEmail}</td>
                                <td class="tdHidden">${userGoodsDTO.userAddress}</td>
                                <td class="tdHidden hiddenGid">${userGoodsDTO.gid}</td>
                            </tr>
                        </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>

        <div class="borrow">
            <p class="title">借阅</p>
            <p class="tip">请输入归还日期<span></span></p>
            <form action="borrow" method="post">
                <input class="gid" type="hidden" name="gid"/>
                <input class="returnDay" name="returnDay" 
                       type="text" placeholder="输入"/>
                <p class="timeTip">eg:2015-3-12</p>
                <p class="borrowError">你的输入格式不正确</p>
                <div class="adjust">
                    <input type="submit" value="确认"/>
                    <input type="button" value="取消"/>						
                </div>
            </form>
        </div>

        <div class="return">
            <p class="title">详情</p>
            <table>
                <tr><td>应还时间</td><td  class="preditReturnTime"></td></tr>
                <tr><td>借出时间</td><td class="lendTime"></td></tr>
                <tr><td>借取人</td><td class="borrower"></td></tr>
                <tr><td>短号</td><td class="shortNumber"></td></tr>
                <tr><td>邮箱</td><td class="QQNumber"></td></tr>
                <tr><td>现住地址</td><td class="longNumber"></td></tr>

            </table>				
            <div class="adjust">
                <form>
                    <button type="button">确认</button>
                </form>
            </div>
        </div>

        <div class="returnMask"></div>
    </body>
</html>
